
/**
 * 单例抽象类
 */
export default class BaseInstance {
    protected static mInstance = null;

    public static GetInstance<T extends {}>(this: new () => T): T {
        if (!(<any>this).mInstance) {
            (<any>this).mInstance = new this();
            (<any>this).mInstance.Init();
        }
        return (<any>this).mInstance;
    }

    /**
     * 初始化
     */
    protected Init() {

    }

    /**
     * 
     */
    public InitData() {

    }

    /**
     * 
     */
    public ResetData() {

    }
}